package com.jilefojing.beans.pojos.enhanced;

import java.util.Date;
import java.util.List;

import com.jilefojing.beans.pojos.EBook;
import com.jilefojing.beans.pojos.enhanced.base.BaseEnhanced;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年09月30日 20时11分24秒
 */
public class EnhancedEBook extends BaseEnhanced {
	public EnhancedEBook(EBook eBook) {
		// TODO 自动生成 细微误差自己调整
		if (eBook.getId() != null) {
			this.id = eBook.getId();
		}
		this.name = eBook.getName();
		if (eBook.getCreateUser() != null) {
			EnhancedUser enhancedUser = new EnhancedUser();
			enhancedUser.setId(eBook.getCreateUser());
			this.enhancedUser = enhancedUser;
		}
		this.createTime = eBook.getCreateTime();
		this.updateTime = eBook.getUpdateTime();
		if (eBook.getParentId() != null) {
			EnhancedEBook enhancedEbook = new EnhancedEBook();
			enhancedEbook.setId(eBook.getParentId());
			this.enhancedParent = enhancedEbook;
		}
		if (eBook.getChildSort() != null) {
			this.childSort = eBook.getChildSort();
		}
		this.rollCount = eBook.getRollCount();
		this.partNumber = eBook.getPartNumber();
		this.proofTime = eBook.getProofTime();
		this.extra = eBook.getExtra();
		if (eBook.getHasContent() != null && eBook.getHasContent() == 1) {
			this.hasContent = true;
		}
	}

	public EnhancedEBook() {
	}

	private long id;
	private String name;
	private EnhancedUser enhancedUser;
	private Date createTime;
	private Date updateTime;
	private EnhancedEBook enhancedParent;
	private double childSort;
	private String rollCount;
	private String partNumber;
	private Date proofTime;
	private String extra;
	private boolean hasContent;
	private List<EnhancedEBook> enhancedChildren;
	private EnhancedStatistics enhancedStatistics;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public EnhancedUser getEnhancedUser() {
		return enhancedUser;
	}

	public void setEnhancedUser(EnhancedUser enhancedUser) {
		this.enhancedUser = enhancedUser;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public EnhancedEBook getEnhancedParent() {
		return enhancedParent;
	}

	public void setEnhancedParent(EnhancedEBook enhancedParent) {
		this.enhancedParent = enhancedParent;
	}

	public double getChildSort() {
		return childSort;
	}

	public void setChildSort(double childSort) {
		this.childSort = childSort;
	}

	public String getRollCount() {
		return rollCount;
	}

	public void setRollCount(String rollCount) {
		this.rollCount = rollCount;
	}

	public String getPartNumber() {
		return partNumber;
	}

	public void setPartNumber(String partNumber) {
		this.partNumber = partNumber;
	}

	public Date getProofTime() {
		return proofTime;
	}

	public void setProofTime(Date proofTime) {
		this.proofTime = proofTime;
	}

	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public boolean isHasContent() {
		return hasContent;
	}

	public void setHasContent(boolean hasContent) {
		this.hasContent = hasContent;
	}

	public List<EnhancedEBook> getEnhancedChildren() {
		return enhancedChildren;
	}

	public void setEnhancedChildren(List<EnhancedEBook> enhancedChildren) {
		this.enhancedChildren = enhancedChildren;
	}

	public EnhancedStatistics getEnhancedStatistics() {
		return enhancedStatistics;
	}

	public void setEnhancedStatistics(EnhancedStatistics enhancedStatistics) {
		this.enhancedStatistics = enhancedStatistics;
	}

}